var frSpan = document.querySelector(".free-registration");
var mag = document.querySelector(".first-login-mag");
var tips = document.getElementsByClassName("tips")[0];
var login = document.querySelector(".login")
var loginL = document.querySelector(".login-last");
var logon = document.querySelector(".logon");
var test = document.querySelector(".test");
var email = document.querySelector(".email");
var gotoL = document.querySelector(".gotoL");
var help = document.querySelector("#Help");
var inputPassword = document.querySelector("#exampleInputPassword1");//密码框
var inputUsername1 = document.querySelector("#exampleInputUsername1");//账号框1
var inputUsername2 = document.querySelector("#exampleInputUsername2");//账号框2
var forgetPassword = document.querySelector(".forget-password");//忘记密码
//注册码
// var codeImg = document.getElementsByClassName("code-img")[0];

//免费注册点击事件
frSpan.onclick = function(){
    mag.innerHTML = "免费注册";
    tips.style.fontSize = "12px";
    loginL.children[0].innerHTML = "";
    loginL.children[1].innerHTML = "";
    login.style.display = "none";
    logon.style.display = "block";
    test.style.display = "block";
    email.style.display = "block";
    gotoL.style.display = "block";
    help.innerHTML = "";
    inputUsername1.style.display = "none";
    inputUsername2.style.display = "block";
    inputPassword.value = "";
}

gotoL.onclick = function(){
    location.reload();//页面刷新
}

forgetPassword.onclick = function(){
    window.location.href="./html/forget-password.html";
}

// codeImg.onclick = function(){
//     var url = "http://localhost:8080/user/checkCode?" + new Date().getTime();
//     codeImg.setAttribute("src",url); 
//     // console.log(codeImg.scr);
    
// }




